< previous page page_489 next page >

Page 489
The controls table and Figure 12.22 contain almost all the information you need to design and code the Visual Basic 5 Subform. Notice that all the textbox and label controls have the same name. These are part of a control array. Lay out the first label/textbox pair. Then use the alternate mouse button to copy and repeatedly paste these two buttons until you have all the fields you need for your form.
Tip.gif
Not only is it easier to build forms using data controls because you save a lot of typing, but it also saves workstation resources. To Visual Basic 5, each control is a resource that must be allotted memory for tracking. Control arrays are counted as a single resource, no matter how many members you have in the array.

0489-01.jpg
Figure 12.22.
Laying out the Header/SubForm example.
Table 12.4. The Controls for the Subform Project.
ControlsPropertiesSettings
FormNamefrmSubForm
CaptionHeader/Sales SubForm
Height4545
Left1395
Top1335
Width6180
Data ControlNameData1
CaptionPublisher Data

continues

 
< previous page page_489 next page >

If you like this book, buy it!